def build_solution( sln_file, build_conf, project = '' )
  cmd = "attrib -R /S #{File.join(File.dirname(sln_file), '*.*')} >NUL"
  puts cmd
  system(cmd)

  proj_str = %Q{/project #{project}} if project.kind_of? String and project.length > 0
  cmd = %Q{devenv "#{sln_file}" /build "#{build_conf}" #{proj_str} >#{File.basename(sln_file)}_#{project}.log}
  puts cmd
  system cmd
end

def incredibuild_solution( sln_file, build_conf, project = '' )
  #~ cmd = "attrib -R /S #{File.join(File.dirname(sln_file), '*.*')} >NUL"
  #~ puts cmd
  #~ system(cmd)

  proj_str = %Q{/PRJ=#{project}} if project.kind_of? String and project.length > 0
  cmd = %Q{buildconsole.exe "#{sln_file}" /REBUILD /CFG="#{build_conf}" #{proj_str} /LOG="#{File.basename(sln_file)}_#{project}.log"}
  puts cmd
  system cmd
end
